package com.mydemo.springlearning.functions.object_mapper;

import com.mydemo.springlearning.functions.object_mapper.po.UserDTO;
import com.mydemo.springlearning.functions.object_mapper.po.UserInfoVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface InfoConverter {
 
    InfoConverter INSTANT = Mappers.getMapper(InfoConverter.class);
 
    @Mappings({
            @Mapping(source = "name", target = "userName")
    })
    UserInfoVO convert(UserDTO userDto);
}